<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">

<!-- BEGIN HEAD -->

<head>

    <meta charset="utf-8"/>

    <title>员工权限设置</title>

    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <meta content="" name="description"/>
    <meta th:content="${session.authorities}" id="authority"/>

    <link href="/media/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/style-metro.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/style-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/default.css" rel="stylesheet" type="text/css" id="style_color"/>
    <link href="/media/css/uniform.default.css" rel="stylesheet" type="text/css"/>

    <link rel="stylesheet" type="text/css" href="/media/css/select2_metro.css"/>
    <link rel="stylesheet" href="/media/css/DT_bootstrap.css"/>
    <link rel="stylesheet" href="/media/ztree/css/bootstrapStyle/bootstrapStyle.css" type="text/css">

    <link rel="shortcut icon" href="/media/image/favicon.ico"/>

</head>

<body class="page-header-fixed">

<div th:replace="common/header :: header"></div>

<div class="page-container row-fluid">

    <div th:replace="common/sider :: sider"></div>

    <div class="page-content">
        <!-- BEGIN PAGE CONTAINER-->
        <div class="container-fluid">

            <!-- BEGIN PAGE HEADER-->
            <div class="row-fluid">
                <div class="span12">
                    <h3 class="page-title">员工权限设置</h3>
                </div>
            </div>
            <div class="row-fluid">
                <div class="span12">
                    <div class="portlet box green">
                        <div class="portlet-title">
                            <div class="caption">
                                <i class="icon-globe"></i>员工权限设置
                            </div>
                            <div class="actions">
                                <div class="btn-group">
                                    <a class="btn" href="#" data-toggle="dropdown"> 列 <i
                                            class="icon-angle-down"></i>
                                    </a>
                                    <div id="table_column_toggler" class="dropdown-menu hold-on-click dropdown-checkboxes pull-right">
                                        <label><input type="checkbox" checked data-column="0">角色名称</label>
                                        <label><input type="checkbox" checked data-column="1">角色码</label>
                                        <label><input type="checkbox" checked data-column="2">角色描述</label>
                                        <label><input type="checkbox" checked data-column="3">所属幼儿园</label>
                                        <label><input type="checkbox" checked data-column="4">创建时间</label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="portlet-body form">
                            <div class="row-fluid">
                                <div class="span4">
                                <div class="btn-group" sec:authorize="hasAuthority('PERMISSION_ROLE_ADD')">
                                    <button class="btn green" id="btn_add">
                                        添加权限角色 <i class="icon-plus"></i>
                                    </button>
                                </div>
                                </div>
                                <div class="span4" sec:authorize="hasAuthority('PERMISSION_GARDEN')">
                                    <div class="control-group">
                                        <label class="control-label span3">所属幼儿园:</label>
                                        <div class="controls span8">
                                            <select class="m-wrap span12"
                                                    name="gardenId">
                                                <option value="0" >全部</option>
                                                <option value="1" th:each="garden:${gardens}" th:text="${garden.gardenName}" th:value="${garden.id}">男</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <table class="table table-striped table-bordered table-hover table-full-width" id="table">
                                <thead>
                                <tr>
                                    <th>角色名称</th>
                                    <th>角色码</th>
                                    <th>角色描述</th>
                                    <th>所属幼儿园</th>
                                    <th>创建时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>

                        </div>

                    </div>

                    <!-- END EXAMPLE TABLE PORTLET-->

                </div>

            </div>

            <!-- START 添加角色 ROLE ALERT-->
            <div class="row-fluid" id="tab1" style="display: none;">
                <div class="span12">
                    <div class="portlet">
                        <div class="portlet-body form">

                            <form action="#" method="POST" class="form-horizontal"
                                  id="submit_form">
                                <div class="form-wizard">
                                    <div class="control-group">
                                        <label class="control-label">角色名<span
                                                class="required">*</span></label>

                                        <div class="controls">
                                            <input type="text" class="span6 m-wrap" name="roleName"/>
                                            <span class="help-inline"></span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">角色码<span
                                                class="required">*</span></label>
                                        <div class="controls">
                                            <input type="text" class="span6 m-wrap" name="roleCode"/>
                                            <span class="help-inline"></span>
                                        </div>
                                    </div>
                                    <div class="control-group ">
                                        <label class="control-label">角色描述</label>
                                        <div class="controls">
                                            <textarea class="span6 m-wrap" name="roleDesc"></textarea>
                                            <span class="help-inline"></span>
                                        </div>
                                    </div>
                                    <div class="control-group" sec:authorize="hasAuthority('PERMISSION_GARDEN')">
                                        <label class="control-label">所属幼儿园</label>
                                        <div class="controls">
                                            <select class="m-wrap span6"
                                                    name="gardenId">
                                                <option value="1" th:each="garden:${gardens}" th:text="${garden.gardenName}" th:value="${garden.id}">男</option>
                                            </select>
                                            <span class="help-inline"></span>
                                        </div>
                                    </div>

                                    <div class="control-group">
                                        <label class="control-label">角色授权</label>
                                        <div class="controls">
                                            <ul id="treeDemo" class="ztree"></ul>
                                        </div>

                                    </div>

                                </div>

                            </form>

                        </div>

                    </div>

                </div>

            </div>
            <!-- END ADD ROLE ALERT-->

            <!-- END PAGE CONTENT-->

        </div>

        <!-- END PAGE CONTAINER-->

    </div>

    <!-- END PAGE -->

</div>

<!-- END CONTAINER -->

<!-- BEGIN FOOTER -->
<div th:replace="common/footer:: footer"></div>
<!-- END FOOTER -->

<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

<!-- BEGIN CORE PLUGINS -->

<script src="media/js/jquery-1.10.1.min.js" type="text/javascript"></script>

<script src="media/js/jquery-migrate-1.2.1.min.js"
        type="text/javascript"></script>

<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->

<script src="media/js/jquery-ui-1.10.1.custom.min.js"
        type="text/javascript"></script>

<script src="media/js/bootstrap.min.js" type="text/javascript"></script>

<!--[if lt IE 9]>

<script src="media/js/excanvas.min.js"></script>

<script src="media/js/respond.min.js"></script>

<![endif]-->

<script src="media/js/jquery.slimscroll.min.js" type="text/javascript"></script>

<script src="media/js/jquery.blockui.min.js" type="text/javascript"></script>

<script src="media/js/jquery.cookie.min.js" type="text/javascript"></script>

<script src="media/js/jquery.uniform.min.js" type="text/javascript"></script>

<!-- END CORE PLUGINS -->

<!-- BEGIN PAGE LEVEL PLUGINS -->

<script type="text/javascript" src="media/js/select2.min.js"></script>

<script type="text/javascript" src="media/js/jquery.dataTables.min.js"></script>

<script type="text/javascript" src="media/js/DT_bootstrap.js"></script>

<script type="text/javascript" src="media/js/jquery.validate.min.js"></script>

<!-- 	<script type="text/javascript" src="media/js/additional-methods.min.js"></script> -->

<script type="text/javascript" src="media/js/chosen.jquery.min.js"></script>


<!-- END PAGE LEVEL PLUGINS -->

<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script type="text/javascript"
        src="media/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript"
        src="media/ztree/js/jquery.ztree.excheck.js"></script>
<script type="text/javascript" src="media/layer/layer.js"></script>
<script src="media/js/app.js"></script>
<script src="media/js/rolelist.js"></script>

<script>
    jQuery(document).ready(function () {

        App.init();
        RoleList.init();

    });
</script>

<script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-37564768-1']);
    _gaq.push(['_setDomainName', 'keenthemes.com']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_trackPageview']);
    (function () {
        var ga = document.createElement('script');
        ga.type = 'text/javascript';
        ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://'
                : 'http://')
            + 'stats.g.doubleclick.net/dc.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ga, s);
    })();
</script>
</body>

<!-- END BODY -->

</html>